Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FreeRedis Diagnostics #547

Merged
merged 4 commits into from
Mar 8, 2023
Merged

Add FreeRedis Diagnostics #547

merged 4 commits into from
Mar 8, 2023

Conversation

guochen2
Copy link
Contributor

@guochen2 guochen2 commented Mar 8, 2023

Please answer these questions before submitting pull request

  • Why submit this pull request?

  • Bug fix

  • New feature provided

  • Improve performance

  • Related issues


New feature or improvement

  • Add FreeRedis Diagnostics

@wu-sheng wu-sheng requested a review from liuhaoyang March 8, 2023 03:45
@wu-sheng wu-sheng added the enhancement New feature or request label Mar 8, 2023
/// </summary>
public class FreeRedisTracingDiagnosticProcessor : ITracingDiagnosticProcessor
{
public static readonly StringOrIntValue Free_Redis = new StringOrIntValue(7, "Redis");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public void Notice([Object] NoticeEventArgs eventData)
{
var context = CreateFreeRedisLocalSegmentContext(eventData.NoticeType.ToString());
context.Span.AddTag("cache.statement", eventData.Log);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the virtual cache doc to update tags accordingly.

https://skywalking.apache.org/docs/main/next/en/setup/service-agent/virtual-cache/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wu-sheng wu-sheng added this to the 2.2.0 milestone Mar 8, 2023

private SegmentContext CreateFreeRedisLocalSegmentContext(string operation)
{
var context = _tracingContext.CreateLocalSegmentContext(operation);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redis calls should use exit segment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redis calls should use exit segment

I don't understand what you mean.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CreateExitSegmentContext.

}
#endregion
/// <summary>
/// 解析读写
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove CN

@wu-sheng wu-sheng requested a review from liuhaoyang March 8, 2023 07:16
wu-sheng
wu-sheng previously approved these changes Mar 8, 2023
Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tags are good to me. @liuhaoyang We may consider a new release.

@@ -0,0 +1,108 @@
using System;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All code files need to add the SkyAPM copyright header. Please refer to https://github.com/SkyAPM/SkyAPM-dotnet/blob/main/src/SkyApm.Abstractions/ITracingDiagnosticProcessor.cs#L1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All code files need to add the SkyAPM copyright header. Please refer to https://github.com/SkyAPM/SkyAPM-dotnet/blob/main/src/SkyApm.Abstractions/ITracingDiagnosticProcessor.cs#L1

ok

@liuhaoyang
Copy link
Collaborator

Tags are good to me. @liuhaoyang We may consider a new release.

+1

@@ -42,6 +42,8 @@ public static class Components

public static readonly StringOrIntValue Free_SQL = new StringOrIntValue(3017, "FreeSql");

public static readonly StringOrIntValue Free_Redis = new StringOrIntValue(3018, "FreeRedis");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guochen2 Please register 3018 ID in the main repository.

@liuhaoyang
Copy link
Collaborator

LGTM

@liuhaoyang liuhaoyang merged commit 7bd426b into SkyAPM:main Mar 8, 2023
@liuhaoyang
Copy link
Collaborator

Tags are good to me. @liuhaoyang We may consider a new release.

Recently I will prepare for the testing and release v2.2.0

@wu-sheng
Copy link
Member

wu-sheng commented Mar 8, 2023

@liuhaoyang Look like we miss updating https://github.com/SkyAPM/SkyAPM-dotnet/blob/main/docs/Supported-list.md for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants